Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

fleetctl: allow disabling packs via apply #2325

Merged
merged 2 commits into from
Oct 21, 2020

Conversation

nyanshak
Copy link
Contributor

@nyanshak nyanshak commented Oct 9, 2020

@nyanshak nyanshak changed the title fleetctl: allow disabling packs via apply WIP: fleetctl: allow disabling packs via apply Oct 9, 2020
@nyanshak nyanshak changed the title WIP: fleetctl: allow disabling packs via apply fleetctl: allow disabling packs via apply Oct 9, 2020
@nyanshak
Copy link
Contributor Author

nyanshak commented Oct 9, 2020

fleetctl get packs
+--------------------+----------+-------------+----------+
|        NAME        | PLATFORM | DESCRIPTION | DISABLED |
+--------------------+----------+-------------+----------+
| example-pack       |          |             | true     |
+--------------------+----------+-------------+----------+

fleetctl get packs --yaml
---
kind: pack
spec:
  disabled: false
  id: 20
  name: example-pack
  queries:
    - description: ""
      interval: 30
      name: example-query
      query: example-query
  targets:
    labels:
      - All Hosts

fleetctl get pack osquery-monitoring --with-queries
# same output as previous command with the queries:
...
---
apiVersion: v1
kind: query
spec:
  description: example query
  name: example-query
  query: SELECT build_platform FROM osquery_info;

@nyanshak nyanshak force-pushed the issue-2240-fleetctl-import-as-disabled branch from a66d914 to 0e47aff Compare October 9, 2020 23:17
Copy link
Contributor

@zwass zwass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, definitely a sensible change. Before we merge this, can you update the test to cover the disabled case? It could probably be as simple as adding a disabled pack in https://github.com/kolide/fleet/blob/master/server/datastore/datastore_packs_test.go#L153.

Copy link
Contributor

@zwass zwass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@zwass zwass merged commit 8246b4d into kolide:master Oct 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants